package com.atguigu.yygh.cmn.Gexception;

import com.atguigu.yygh.cmn.common.result.Result;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

import java.sql.SQLIntegrityConstraintViolationException;

@ControllerAdvice
public class GlobalException {
    @ExceptionHandler(Exception.class)
    public Result allException(Exception ex){
        return Result.fail("失败啦");
    }
}
